package com.lemon.cloud.admin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lemon.cloud.admin.dto.RoleDTO;
import com.lemon.cloud.comm.po.RoleApplication;
import com.lemon.cloud.comm.model.ResultMsg;
import com.lemon.cloud.comm.po.SysRole;
import com.lemon.cloud.core.excel.ExcelErrorMessage;

import java.util.List;

public interface SysRoleService extends IService<SysRole> {

    List<SysRole> getRolesByUserId(Long sysUserId);

    void delRolePermission(Long menuId, Long roleId);

    IPage<SysRole> getRoleByPage(Page<SysRole> page, SysRole role);

    ResultMsg<SysRole> updateRole(SysRole sysRole);

    ResultMsg<SysRole> addRole(SysRole sysRole);

    ResultMsg<Boolean> deleteRole(Long id);

    void delRoleMenu(Long id);

    ResultMsg<Boolean> saveRoleMenus(RoleDTO roleDTO);

    List<ExcelErrorMessage> addBatch(List<SysRole> list);

    List<RoleApplication> getDSList(List<String> roleIdList);

    ResultMsg<Boolean> saveRoleData(List<RoleApplication> roleData);
}
